/**
 * Created by webrx on 2024/5/10.
 */
import router from './'
import {getToken} from '@/api/auth'

const whiteList = ['/login']

router.beforeEach((to, from, next) => {
    if (getToken()) next()
    if (whiteList.includes(to.path)) next()
    next('/login')
})
